<?php
    $data = $this->requestAction('block/adv');
    $controller_name = $this->params['controller'];
    
?>

<div class="adv <?php echo $controller_name == 'intro' ? 'adv-intro' : '' ?>" style="margin-top: 75px;">
    
    <div class="share_social">
        <ul>
            <?php
                $lang_code = $this->Session->read('lang_code');
                if($lang_code == 'vn'){
            ?>
                <li class="lang_code"><a lang_code='vn' href=""><img src="<?php echo $this->webroot.'images/flag-vn.png' ?>" /></a><a lang_code='en' href=""><img src="<?php echo $this->webroot.'images/flag-en.png' ?>" /></a></li>
            <?php
                }else{
            ?>
                <li class="lang_code"><a lang_code='en' href=""><img src="<?php echo $this->webroot.'images/flag-en.png' ?>" /></a><a lang_code='vn' href=""><img src="<?php echo $this->webroot.'images/flag-vn.png' ?>" /></a></li>
            <?php
                }
            ?>
            
            <?php
                if(@$settings['social_facebook'] != '')
                    echo '<li><a href="'.$settings['social_facebook'].'"><img src="'.$this->webroot.'images/b-fb.png" /><span>Facebook</span></a></li>';
                if(@$settings['social_twitter'] != '')
                    echo '<li><a href="'.$settings['social_twitter'].'"><img src="'.$this->webroot.'images/b-tw.png" /><span>Twitter</span></a></li>';
                if(@$settings['social_google'] != '')
                    echo '<li><a href="'.$settings['social_google'].'"><img src="'.$this->webroot.'images/b-gg.png" /><span>Google+</span></a></li>';
                if(@$settings['youtube'] != '')
                    echo '<li><a href="'.$settings['youtube'].'"><img src="'.$this->webroot.'images/b-yt.png" /><span>Youtube</span></a></li>';
            ?>
        </ul>
    </div>
    
    
    <div class="support">
        <ul>
            <li class="header-support"><img src="<?php echo $this->webroot . 'images/icon-smile.png' ?>" /></li>
            <li><p><span>HOTLINE</span></p>
                <ul class="sub">
                <?php
                    $hotline = $settings['hotline'];
                    $list_hotline = explode(';', $hotline);
                    foreach($list_hotline as $hotline)
                    {
                        echo '<li><span>'.$hotline.'</span></li>';
                    }
                ?>
                </ul>
            </li>
            <li><p><span>HỖ TRỢ</span></p>
                <ul class="sub">
                    <?php
                        $skype = $settings['support_skype'];
                        $list_skype = explode(';', $skype);
                        $i = 0;
                        foreach($list_skype as $skype)
                        {
                            if($i++ % 2 == 0)
                                echo '<li><span><a href="Skype:'.$skype.'?chat"><img src="'. $this->webroot . 'images/skype-large.png"/> '.$list_skype[$i].'</span></a></li>';  
                        }
                        
                        $yahoo = $settings['support_yahoo'];
                        $list_yahoo = explode(';', $yahoo);
                        $i = 0;
                        foreach($list_yahoo as $yahoo)
                        {
                            if($i++ % 2 == 0)
                            echo '<li><span><a href="ymsgr:sendim?'.$yahoo.'"><img src="'. $this->webroot . 'images/yahoo-large.png"/> '.$list_yahoo[$i].'</span></a></li>';  
                        }
                    ?>
                </ul>
            </li>
        </ul>
    </div>
    
</div>